local zhisheng = fk.CreateSkill {
  name = "lingling__zhisheng",
  tags = { Skill.Compulsory }
}

Fk:loadTranslationTable{
  ["lingling__zhisheng"] = "治盛",
  [":lingling__zhisheng"] = "锁定技，摸牌阶段，你多摸两张牌。你的手牌上限始终+2。",
}

zhisheng:addEffect(fk.DrawNCards, {
  anim_type = "drawcard",
  on_use = function(self, event, target, player, data)
    data.n = data.n + 2
  end,
})

zhisheng:addEffect("maxcards", {
  correct_func = function(self, player)
    if player:hasSkill(self.name) then
      return 2
    end
  end
})

zhisheng:addTest(function(room, me)
  FkTest.runInRoom(function()
    room:handleAddLoseSkills(me, zhisheng.name)
  end)
  FkTest.runInRoom(function()
    GameEvent.Turn:create(TurnData:new(me, "game_rule", { Player.Draw })):exec()
  end)
  lu.assertEquals(#me:getCardIds("h"), 4)
  lu.assertEquals(me:getMaxCards(), me.hp + 2)
end)

return zhisheng
